From 280d13c03103f374d7fa8bd6b7664989ed2fa2ab Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 19 Aug 2025 05:08:34 +0000 Subject: [PATCH] Bug 1983713 - Use non-deprecated ast value. r=firefox-build-system-reviewers,nalexander,ahochheiden ast.Str was deprecated in python 3.12 and removed in 3.14. It inherited from ast.Constant, `Str.s` was equivalent to `Constant.value`, so we can use the latter on both old and newer python versions. Differential Revision: https://phabricator.services.mozilla.com/D261511 Gbp-Pq: Topic fixes Gbp-Pq: Name Bug-1983713-Use-non-deprecated-ast-value.-r-firefox-.patch --- python/mach/mach/command_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mach/mach/command_util.py b/python/mach/mach/command_util.py index 44e13f18d6c..8539bf37b5b 100644 --- a/python/mach/mach/command_util.py +++ b/python/mach/mach/command_util.py @@ -292,7 +292,7 @@ class DecoratorVisitor(ast.NodeVisitor): kwarg_dict = {} for name, arg in zip(["command", "subcommand"], decorator.args): - kwarg_dict[name] = arg.s + kwarg_dict[name] = arg.value for keyword in decorator.keywords: if keyword.arg not in relevant_kwargs: -- 2.30.2